package com.hlcity.service.impl;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.hlcity.domain.Category;
import com.hlcity.mapper.CategoryMapper;
import com.hlcity.service.CategoryService;

@Transactional
public class CategoryServiceImpl implements CategoryService {

	private CategoryMapper categoryMapper;

	public void setCategoryMapper(CategoryMapper categoryMapper) {
		this.categoryMapper = categoryMapper;
	}

	public void add(Category category) {
		categoryMapper.insertCategory(category);
	}

	public List<Category> getByType(String type) {
		return categoryMapper.getCategoryByType(type);
	}

}
